package com.zhidian.edm.controller;


import com.zhidian.edm.result.ResultResponse;
import com.zhidian.edm.service.AuthInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/sys")
@Tag(name = "获取系统基础信息", description = "获取系统基础信息")
public class AuthInfoController {

    @Resource
    private AuthInfoService authInfoService;

    @GetMapping("/info")
    @Operation(summary = "获取当前登录信息", description = "获取当前登录信息")
    public ResultResponse<Map<String,Object>> getInfoByUserId(){
        return ResultResponse.success(authInfoService.getInfoByUserId());
    }

}
